<!DOCTYPE HTML>
<html>

<head>
    <meta charset="utf-8">
    <title>选择用户</title>
    <meta name="viewport" content="maximum-scale=1.0,minimum-scale=1.0,user-scalable=0,width=device-width,initial-scale=1.0" />
    <meta name="format-detection" content="telephone=no,email=no,date=no,address=no">
    <link rel="stylesheet" type="text/css" href="../css/api.css" />
    <link rel="stylesheet" type="text/css" href="../css/aui.css" />
    <link rel="stylesheet" type="text/css" href="../css/iconfont.css" />
    <link rel="stylesheet" type="text/css" href="css/comm.css" />
    <link rel="stylesheet" type="text/css" href="css/chooseserviceuser.css" />
</head>

<body>
    <template type="text/x-template" id="item-template">
      <li>
          <span class="choosespan" v-on:click="choose_type(item)">
              <input type="radio" class="aui-radio" v-bind:checked="item.ID==selecttypeid">
          </span>
          <span class="name_span" v-on:click="toggle(item)">
            {{item.text}}
          </span>
          <ul class="level2" v-show="isOpen" v-if="isFolder">
              <tree-item v-for="(child, index) in item.children" :key="index" :item="child"></tree-item>
          </ul>
      </li>
  </template>
    <div id="app" v-cloak>
        <div class="aui-content">
            <!-- con -->
            <div v-if="PublishType==1" class="aui_formbox edit">
                <div v-if="ServiceType==1||ServiceType==2" class="aui_formitem col-star">
                    <div class="aui_formtitle">
                        工单类别
                    </div>
                    <div v-on:click="open_type_list()" class="aui_formcontent">
                        {{TypeName}}
                    </div>
                </div>
                <div v-if="is_type_list==true" class="choosetype_list">
                    <ul class="mytree level0">
                        <template v-for="item in typelist">
                                <tree-item class="item" :item="item"></tree-item>
                            </template>
                    </ul>
                </div>
                <div v-on:click="open_tag_list()" v-if="ServiceType==1" class="aui_formitem">
                    <div class="aui_formtitle">
                        任务标签
                    </div>
                    <div class="aui_formcontent">
                        {{TagName}}
                    </div>
                </div>
                <div v-if="is_tag_list" class="choosetype_list choosetag_list">
                    <ul class="mytree level0">
                        <li v-for="item in taglist" v-on:click="choose_tag(item)">
                            <span class="choosespan">
                                    <input type="radio" class="aui-radio" v-bind:checked="item.ID==TagID">
                                </span>
                            <span class="name_span">
                                  {{item.Name}}
                                </span>
                        </li>
                    </ul>
                </div>
                <div v-if="ServiceType==3" class="aui_formitem">
                    <div class="aui_formtitle">
                        问题分类
                    </div>
                    <div v-on:click="open_category_list()" class="aui_formcontent">
                        {{CategoryName}}
                    </div>
                </div>
                <div v-if="is_category_list" class="choosetype_list">
                    <ul class="mytree level0">
                        <li v-for="item in categorylist" v-on:click="choose_category(item)">
                            <span class="choosespan">
                                    <input type="radio" class="aui-radio" v-bind:checked="item.ID==CategoryID">
                                </span>
                            <span class="name_span">
                                  {{item.Name}}
                                </span>
                        </li>
                    </ul>
                </div>
            </div>
            <div v-if="PublishType!=1" class="aui_title">
                协同方式
            </div>
            <div v-if="PublishType!=1" class="aui_formbox">
                <div v-on:click="do_select_publishtype(2)" class="aui_formitem">
                    <div class="aui_formtitle processopt">
                        <input class="aui-radio" type="radio" name="processtype" v-bind:checked="PublishType==2"> 转交
                    </div>
                    <div class="aui_formcontent">
                        工单将以派单的方式转交给其他人员，人员需要接单后，您不能再对工单进行查看、处理等操作。
                    </div>
                </div>
                <div v-on:click="do_select_publishtype(3)" class="aui_formitem">
                    <div class="aui_formtitle processopt">
                        <input class="aui-radio" type="radio" name="processtype" v-bind:checked="PublishType==3"> 共享
                    </div>
                    <div class="aui_formcontent">
                        工单将以共享的方式分享给其他人员，所有共享人员都可以进行处理、办结等操作。
                    </div>
                </div>
            </div>
            <div class="aui_title">
                接单人
            </div>
            <ul class="mytree level0 myorgnization pb4">
                <li v-for="item in list">
                    <span class="name_span company">{{item.text}}</span>
                    <ul class="level1">
                        <li v-for="item2 in item.children">
                            <span v-if="item2.TypeID==4" class="choosespan" v-on:click="do_choose(item2,item.children)">
                              <input type="checkbox" class="aui-checkbox" v-bind:checked="item2.isselected">
                          </span>
                            <span class="name_span department">{{item2.text}}</span>
                            <span class="2_2_span">({{item2.usercount}})</span>
                            <ul class="level2">
                                <li class="name_phone" v-for="item3 in item2.children">
                                    <span v-if="item3.TypeID==4" class="choosespan" v-on:click="do_choose(item3,item2.children)">
                                        <input type="checkbox" class="aui-checkbox" v-bind:checked="item3.isselected">
                                    </span>
                                    <span class="name_span" v-on:click="do_choose(item3,item2.children)">{{item3.text}}
                                        <span style="padding:0;" v-if="item3.position">
                                        ({{item3.position}})
                                        </span>
                                    </span>
                                    <a class="phone_a" v-on:click="tel_phone(item3)">{{item3.phone}}</a>
                                </li>
                            </ul>
                        </li>
                    </ul>
                </li>
            </ul>
        </div>
        <div class="aui_bottom">
            <div class="aui_bottombtn" v-on:click="do_save()">确认</div>
        </div>
    </div>
</body>
<script type="text/javascript " src="../script/api.js "></script>
<script type="text/javascript " src="../script/vue.js "></script>
<script type="text/javascript" src="../script/config.js"></script>
<script type="text/javascript" src="../script/common.js"></script>
<script type="text/javascript" src="../script/aui-toast.js"></script>
<script type="text/javascript" src="js/chooseserviceuser.js"></script>

</html>
